-
Notifications
You must be signed in to change notification settings - Fork 0
[TM-2139[ add centroids to site polygons #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TM-2139[ add centroids to site polygons #205
Conversation
@@ -1,4 +1,4 @@ | |||
import { populateDto } from "@terramatch-microservices/common/dto/json-api-attributes"; | |||
import { populateDto, AdditionalProps } from "@terramatch-microservices/common/dto/json-api-attributes"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AdditionalProps is not being used, you can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
[literal("ST_Y(ST_Centroid(geom))"), "centroidLatitude"], | ||
[literal("ST_X(ST_Centroid(geom))"), "centroidLongitude"] | ||
], | ||
required: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to mean that if a site doesn't have an associated polygon, it won't be returned at all. Is that the desired behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, at first I thought I should be like that, nonetheless I removed because even though it should be joined to a geometry, it should return the data anyway.
add centroid and polygonUuid to site polygon Dto